package com.gis507.mapreduce.track;

import com.gis507.mapreduce.AISBean.AnalysisIndex;
import com.gis507.mapreduce.Utils.UtilsClass;
import lombok.extern.slf4j.Slf4j;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;

@Slf4j
public class AISInterpolationReducer extends Reducer<Text, AnalysisIndex,AnalysisIndex, NullWritable> {

//    //设定的最大时间
//    private static final double STANDTIME = 30;
//    private static final double MinTime = 30;
//    //设定的最大距离
//    private static final double STANDSTANCE = 1000;
//    private static int sum = 0;
    private double maxStance = 500;

    @Override
    protected void reduce(Text key, Iterable<AnalysisIndex> values, Context context) throws IOException, InterruptedException {



        for (AnalysisIndex value : values) {
            context.write(value,NullWritable.get());
        }



    }
}
